package se.webbzon.boltzmann.game.object.action;

import se.webbzon.boltzmann.environment.AbstractEnvironment;
import se.webbzon.boltzmann.environment.EnvironmentInflator;
import se.webbzon.boltzmann.game.sequence.builder.SequenceRowInflatorGroup;
import se.webbzon.oschi01.worldeditor.WorldObjectDeflation;
import se.webbzon.oschi01.worldobject.WorldObject;

public class SequenceActionInflator extends EnvironmentInflator {
	
	// The sequence row inflator group associated with this inflator
	private final SequenceRowInflatorGroup inflatorGroup;
	
	/*============================================================
	Public Methods
	============================================================*/

	/** Creates a new sequence action inflator. **/
	public SequenceActionInflator(	AbstractEnvironment env,
									SequenceRowInflatorGroup inflatorGroup) {
		super(env, SequenceAction.worldObjectName);
		this.inflatorGroup = inflatorGroup;
	}
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public WorldObject makeWorldObject(WorldObjectDeflation deflation) {
		SequenceActionDeflation sad = ((SequenceActionDeflation) deflation);
		return sad.makeSequenceAction(getEnvironment(), inflatorGroup);
	}

	@Override public WorldObjectDeflation makeDeflation(int deflationProperties, WorldObject[] dependencies) {
		return new SequenceActionDeflation(deflationProperties,dependencies);
	}

}
